import { createRouter, createWebHistory } from 'vue-router';
import ScanQRCode from '@/components/ScanQRCode.vue';
import Home from '@/components/Home.vue';
import RestaurantDetail from '@/components/RestaurantDetail.vue';


const routes = [
  
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/scan-qr-code',
    name: 'ScanQRCode',
    component: ScanQRCode,
    props: true 
  },
  {
    path: '/restaurant-detail:qrCodeData',
    name: 'RestaurantDetail',
    component: RestaurantDetail,
    props: true 
  }
];

const router = createRouter({
  history: createWebHistory(),
  routes
});

export default router
